Skip to content

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#24

Open
thomasthaddeus wants to merge 1 commit into
mainfrom
alert-autofix-2
Open

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#24
thomasthaddeus wants to merge 1 commit into
mainfrom
alert-autofix-2

Conversation

@thomasthaddeus
Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/Visionary-Code-Works/vcw-scss-layout/security/code-scanning/2

Add an explicit permissions block to .github/workflows/ci-cd.yml.
Best single fix without changing intended behavior: define permissions at workflow root so they apply consistently to all jobs (current and future unless overridden). Since this workflow checks out code and deploys to GitHub Pages, set:

  • contents: read (for checkout/read operations)
  • pages: write (for GitHub Pages deployment)
  • id-token: write (commonly required by Pages deployment flows)

This addresses CodeQL’s requirement and preserves deployment capability better than setting only contents: read.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@thomasthaddeus thomasthaddeus marked this pull request as ready for review May 16, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant